import request from '@/utils/request'

// 请求列表 错误码 404001
export function getroomList(params) {
  return request({
    url: `/parkManage/room/getList`,
    method: "get",
    params,
  });
}

// 新增 错误码 404002
export function addroom(data) {
  return request({
    url: `/parkManage/room/add`,
    method: "post",
    data,
  });
}

// 修改 错误码 404003
export function editroom(data) {
  return request({
    url: `/parkManage/room/edit`,
    method: "put",
    data,
  });
}


// 详情 错误码 404004
export function getroomDetail(id) {
  return request({
    url: `/parkManage/room/${id}`,
    method: "get",
  });
}

// 删除 错误码 404005
export function deleteRoom(id) {
  return request({
    url: `/parkManage/room/delete/${id}`,
    method: "delete",
  });
}

// 配置人员列表 错误码404006
export function roomUserList(params) {
  return request({
    url: `/parkManage/roomUser/getList`,
    method: "get",
    params
  });
}

// 配置人员删除 错误码404007
export function deleteRoomUserList(id) {
  return request({
    url: `/parkManage/roomUser/delete/${id}`,
    method: "delete",

  });
}

// 配置人员增加 错误码404008
export function addBatch(data) {
  return request({
    url: `/parkManage/roomUser/addBatch`,
    method: "put",
    data
  });
}

// 配置用能设备列表 错误码404006
export function energyDeviceList(params) {
  return request({
    url: `/parkManage/energyDevice/getList`,
    method: "get",
    params
  });
}

// 可添加设备列表 错误码404007
export function devicesList(params) {
  return request({
    url: `/energy/device/list`,
    method: "get",
    params
  });
}

// 配置用能设备删除 错误码404007
export function deleteEnergyDevice(id) {
  return request({
    url: `/parkManage/energyDevice/delete/${id}`,
    method: "delete",
  });
}

// 配置用能设备增加 错误码404008
export function addEnergyDevice(data) {
  return request({
    url: `/parkManage/energyDevice/addBatch`,
    method: "put",
    data
  });
}

// 回路列表 错误码404006
export function deviceList(params) {
  return request({
    url: `/parkManage/device/getList`,
    method: "get",
    params
  });
}
